#include "tunnel_func.h"


#define SOCKS_REQ_SZ 3
#define PORT 8080
#define UDP_PORT PORT + 1
#define ADDRESS "127.0.0.1"

struct IdMessage
{
  uint8_t version;
  uint8_t numMethods;
  uint8_t * methods; 
};

struct SocksRequest
{
  uint8_t version;
  uint8_t cmd;
  uint8_t rsv;
  uint8_t atype;
  uint8_t size;
  uint8_t * address; //v requeste je prvy byte velkost, tuna je to uz bez toho prveho bytu
  uint16_t port; // pozor na sietovy format
};

struct SocksReply
{
  uint8_t version;
  uint8_t rep;
  uint8_t rsv;
  uint8_t atype;  
  uint8_t address_data[]; //v pripade DOMAIN je prvy byte velkost, posledne 2 bajty su port
  //uint16_t port; // pozor na sietovy format
}__attribute__((packed));

